package Kasir;

import java.awt.*;
import javax.swing.JPanel;

public class BesarKecil extends JPanel {


    private int size;
    private int dsize;

    public BesarKecil() {
        size = 10;
        dsize = 1;
    }

    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        if (size > 40 || size < 10) {
            dsize = -dsize;
        }
        g.setColor(Color.getHSBColor((float) Math.random(), (float) Math.random(), (float) Math.random()));
        g.setFont(new Font("Arial", Font.BOLD, size += dsize));
        g.drawString("SELAMAT DATANG", 5, getHeight() / 2);
    }
}